﻿using System;
using System.Web.UI;
using WebEmulatorHP48.ServiceRefEmulator48;

namespace WebEmulatorHP48
{
    public partial class _Default : System.Web.UI.Page
    {
        ServiceEmulatorHP48Client emul;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
                emul = new ServiceEmulatorHP48Client();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if(emul==null)
                emul = new ServiceEmulatorHP48Client();

            HpElement item = new HpElement();
            item.value = this.TextBox1.Text;
            emul.AddElement(item);

            foreach (var el in emul.GetPile())
            {
                this.llbTest.Text = "ITEM_" + el.value;
            }

        }



    }
}
